const nunjucks = require('nunjucks');
const path = require('path');
//如何渲染模板文件
let data = {name:'zhufegjiagou'};
//配置模板文件的所在目录 可以是相对，也可以是绝对的目录
nunjucks.configure(path.resolve('view'),{
    autoescape:true
});
let result = nunjucks.render('user.html',data);
console.log(result);